package com.example.fx.utils

import android.widget.ImageView
import androidx.databinding.BindingAdapter
import com.bumptech.glide.Glide

/**
 * 自定义绑定适配器---图片
 */
class ImageBinding {
    companion object{
        @BindingAdapter("img_url")
        @JvmStatic
        fun imageBinding(imageView: ImageView,url:String?){
            if(url!=null){
                Glide.with(imageView.context).load(url).into(imageView)
            }
        }
    }
}